from django.http import JsonResponse
from .models import *
# Create your views here.
def getanswerlist(request):
    response = dict();

    ansList = list()
    answerlist = NiitAnswerList.objects.all()
    for itm in answerlist:
        ansList.append({
            "id":itm.id,
            "name": itm.keyword,
            "markdown":itm.markdown

        })
    response["ans"] = ansList
    return JsonResponse(response)